<template>
	<view class="content">
		<view class="list_box">
			<view class="list_item" @click="goCLogin">
				<view class="list_left">修改登录密码</view>
				<image class="list_r" src="../../static/image/grzx_ico_jr_hui@2x.png" mode=""></image>
			</view>
			<view class="list_item" @click="goSetPay" v-show="profileinfo.pay_pwd==null">
				<view class="list_left">设置支付密码</view>
				<image class="list_r" src="../../static/image/grzx_ico_jr_hui@2x.png" mode=""></image>
			</view>
			<block v-if="profileinfo.pay_pwd!=null">
				<view class="list_item" @click="goCpay">
					<view class="list_left">修改支付密码</view>
					<image class="list_r" src="../../static/image/grzx_ico_jr_hui@2x.png" mode=""></image>
				</view>
				<view class="list_item" @click="goFpay">
					<view class="list_left">忘记支付密码</view>
					<image class="list_r" src="../../static/image/grzx_ico_jr_hui@2x.png" mode=""></image>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	import {headlook} from '@/api/personal.js'
	export default {
		data() {
			return {
				profileinfo: []
			}
		},
		onLoad() {
			this._getprofileinfo()
		},
		onShow() {
			this._getprofileinfo()
		},
		methods: {
			_getprofileinfo() {
				headlook().then(res => {
					this.profileinfo = res.data
				})
				
			},
			goCLogin() {
				uni.navigateTo({
					url: 'SetLoginPwd'
				})
			},
			goSetPay() {
				uni.navigateTo({
					url: 'setPayPwd'
				})
			},
			goCpay() {
				uni.navigateTo({
					url: 'ChangePay'
				})
			},
			goFpay() {
				uni.navigateTo({
					url: 'forgetPay'
				})
			}

		}
	}
</script>

<style>
	.content {
		width: 100%;
		height: 100%;
		overflow: hidden;
		background-color: #F5F5F5;
	}

	.list_box {
		width: 100%;
		height: auto;
		margin-top: 20rpx;
	}

	.list_item {
		width: 100%;
		height: 100rpx;
		border-bottom: 1rpx solid #F5F5F5;
		background-color: #FFFFFF;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 30rpx;
	}

	.list_r {
		width: 12rpx;
		height: 22rpx;
	}
</style>
